package com.miao.controller.front;

import com.miao.entity.Parttime;
import com.miao.service.CategoryService;
import com.miao.vo.CategoryVo;
import com.miao.vo.PageVo;
import com.miao.vo.ResultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: 丰
 * @date: 2023/3/2 19:12
 */
@Api(tags = "兼职分类接口")
@RestController
@RequestMapping("/front/category")
public class CategoryController {

    @Autowired
    private CategoryService categoryService;


    @GetMapping("/getAll")
    @ApiOperation("查询所有分类")
    public ResultVo<List<CategoryVo>> getAll(String categoryName){

        List<CategoryVo> categoryVos= categoryService.getAlls(categoryName);
        return ResultVo.success(categoryVos);
    }

}
